package de.ars.client.items.animators;

import de.ars.client.animator.AbstractSlideItemAnimator;
import de.ars.client.animator.IAnimationEventListener;

public class AddPersonItemAnimator extends AbstractSlideItemAnimator
{    
	public AddPersonItemAnimator(IAnimationEventListener listener) 
	{
		super(listener);
	}
	
	public void openItem()
	{
		this.startAnimationTo(POINT_POS, this.layout.getAddPersonPos(), STANDARD_ANIMATION_SPEED);
		this.startAnimationTo(POINT_TEXT_POS, this.layout.getAddPersonTextPos(), STANDARD_ANIMATION_SPEED);
		
		listener.animationEvent(IAnimationEventListener.ANIMATION_STARTED);
	}
	
	public void closeItem()
	{
		this.startAnimationTo(POINT_POS, this.layout.getAddPersonClosePos(), STANDARD_ANIMATION_SPEED);
		this.startAnimationTo(POINT_TEXT_POS, this.layout.getAddPersonCloseTextPos(), STANDARD_ANIMATION_SPEED);
		
		listener.animationEvent(IAnimationEventListener.ANIMATION_STARTED);
	}
}